// JSON Java Class Generator
// Written by Bruce Bao
// Used for API: 
package com.zuihai.app.mvp.model.entity;

import com.zuihai.app.mvp.model.api.Api;

import java.io.Serializable;

public class BaseMain<T> implements Serializable {
	private String code;
	private String msg;
	private T data;

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}

	@Override
	public String toString() {
		return "BaseJson{" +
				"code='" + code + '\'' +
				", msg='" + msg + '\'' +
				", date=" + data +
				'}';
	}
	public boolean isSuccess() {
		if (code.equals(Api.RequestSuccess)) {
			return true;
		} else {
			return false;
		}
	}
}
